export const schema = {
    type: "page",
    title: "新建保险方案",
    body: {
        api: "post:/api/safe_plan",
        submitText: "",
        type: "form",
        title: "",
        mode: "horizontal",
        actions: [
            {
                type: "button",
                actionType: "submit",
                label: "提交",
                icon: "fa fa-check pull-left",
                level: "primary",
                redirect: "/safe_plan"
            }
        ],
        controls: [
            {
                type: "text",
                name: "name",
                label: "保险名称",
                required: true
            },
            {
                type: "text",
                name: "company",
                label: "保险公司",
                required: true
            },
            {
                type: "text",
                name: "price",
                label: "保险金额",
                validations: 'isFloat',
                required: true
            },
            {
                type: 'url',
                name: 'detail_link',
                label: '保险链接',
                required: true
            },
            {
                type: "image",
                label: "图片",
                maxSize: 10 * 1024 * 1024,
                desc: '请选择 jpg 或者 png 图片，单个文件请不要超过 10M，建议尺寸比例：（200 x 200）。',
                name: "photo",
                required: true
            },
            {
                type: 'textarea',
                name: 'description',
                required: true,
                label: '保险简介'
            },
            {
                label: '提交API地址',
                type: 'text',
                name: 'api',
                required: true
            },
            {
                label: '产品编号',
                name: 'code',
                type: 'text',
                required: true
            },
            {
                label: '状态',
                name: 'status',
                type: 'switch'
            },
            {
                label: '反馈接口',
                name: 'feedback_api',
                type: 'url'
            }
        ]
    }
};
